package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.domain.db.AnalysisByDay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AnalysisByDayMapper extends BaseMapper<AnalysisByDay> {
    @Select("select sum(num_registered) as num from tb_analysis_by_day")
    Long queryCumulativeUsers();

    @Select(" select sum(num_active) as num from tb_analysis_by_day where record_date>=#{pass}")
    Long queryActivePassDays(String pass);

    @Select("select ${columName} from tb_analysis_by_day where record_date=#{dateStr}")
    Long queryNumByColumnAndDate(@Param("columName") String columName, @Param("dateStr") String dateStr);


}
